<div class="cabecalho">
    <h3>Administrar Planos</h3>
    <div class="clear"></div>
</div>

<table width="100%">
    <tr>
    	<th nowrap="nowrap">#ID</th>
        <th>Nome</th>
        <th>Descrição</th>
        <th>Valor R$</th>
        <th>Status</th>
        <th nowrap="nowrap"></th>
    </tr>
    <?php if ( !count($this->paginator) > 0) : ?>
    <tr><td colspan="6">NENHUM REGISTRO</td></tr>
    <?php endif; ?>
    <?php foreach($this->paginator as $plano) : ?>
    <tr id="cid_<?php echo $plano->id_plano; ?>">
    	<td><?php echo $plano->id_plano; ?>
        <td><?php echo $plano->nome; ?></td>
        <td><?php echo $plano->descricao; ?></td>
        <td><?php echo number_format($plano->valor, 2, ',', '.'); ?></td>
        <td><?php echo ($plano->ativo == 1)? "Ativo" : "Inativo"; ?></td>
        <td>
        	<a href="<?php echo $this->baseUrl();?>/plano/edit/id_plano/<?php echo $plano->id_plano; ?>">
        		<img alt="editar" src="<?php echo $this->baseUrl();?>/assets/images/actions/edit.png" border="0" align="absbottom">
        	</a>
        	&nbsp;
        	<a href="<?php echo $this->baseUrl();?>/plano/delete/id_plano/<?php echo $plano->id_plano; ?>">
        		<img alt="editar" src="<?php echo $this->baseUrl();?>/assets/images/actions/delete.png" border="0" align="absbottom">
        	</a>
        </td>
    </tr>
    <?php endforeach; ?>
    <tr align="center">
    	<td colspan="6">
			<?php echo $this->paginator; ?>
    	</td>
    </tr>
    
</table>

<div class="actions">
    <div class="esquerda">
        <a href="javascript:history.back();" class="button" title="voltar">Voltar</a>
    </div>
    &nbsp;
    <div class="direita">
        <a href="<?php echo $this->baseURL() ?>/plano/create" class="button" title="Cadastro">Cadastro</a>
    </div>
</div>